﻿@model SitemapModel
@using Nop.Web.Models.Common;
@{
    Layout = "~/Views/Shared/_ColumnsOne.cshtml";

    //title
    Html.AddTitleParts(T("PageTitle.Sitemap").Text);
}
<div class="page sitemap-page">
    <div class="page-title">
        <h1>@T("Sitemap")</h1>
    </div>
    <div class="page-body">
        <div class="entity">
            <div class="entity-body">
                <ul>
                    <li><a href="@Url.RouteUrl("HomePage")">@T("HomePage")</a></li>
                    <li><a href="@Url.RouteUrl("ProductSearch")">@T("Search")</a></li>
                    @if (Model.NewsEnabled)
                    {
                        <li><a href="@Url.RouteUrl("NewsArchive")">@T("News")</a></li>
                    }
                    @if (Model.BlogEnabled)
                    {
                        <li><a href="@Url.RouteUrl("Blog")">@T("Blog")</a></li>
                    }
                    @if (Model.ForumEnabled)
                    {
                        <li><a href="@Url.RouteUrl("Boards")">@T("Forum.Forums")</a></li>
                    }
                    <li><a href="@Url.RouteUrl("ContactUs")">@T("ContactUs")</a></li>
                    <li><a href="@Url.RouteUrl("CustomerInfo")">@T("Account.MyAccount")</a></li>
                    @if (Model.Topics.Count > 0)
                    {
                        foreach (var item in Model.Topics)
                        {
                            <li><a href="@Url.RouteUrl("Topic", new {Sename = Html.GetTopicSeName(item.SystemName)})">@item.Title</a></li>
                        }
                    }
                </ul>
            </div>
        </div>
        @if (Model.Categories.Count > 0)
        {
            <div class="entity">
                <div class="entity-title">
                    <h2>@T("Sitemap.Categories")</h2>
                </div>
                <div class="entity-body">
                    <ul>
                        @foreach (var category in Model.Categories)
                        { 
                            <li><a href="@Url.RouteUrl("Category", new { SeName = category.SeName })">@category.Name</a></li>
                        }
                    </ul>
                </div>
            </div>
        }
        @if (Model.Manufacturers.Count > 0)
        {
            <div class="entity">
                <div class="entity-title">
                    <h2>@T("Sitemap.Manufacturers")</h2>
                </div>
                <div class="entity-body">
                    <ul>
                        @foreach (var manufacturer in Model.Manufacturers)
                        { 
                            <li><a href="@Url.RouteUrl("Manufacturer", new { SeName = manufacturer.SeName })">@manufacturer.Name</a></li>
                        }
                    </ul>
                </div>
            </div>
        }
        @if (Model.Products.Count > 0)
        {
            <div class="entity">
                <div class="entity-title">
                    <h2>@T("Sitemap.Products")</h2>
                </div>
                <div class="entity-body">
                    <ul>
                        @foreach (var product in Model.Products)
                        { 
                            <li><a href="@Url.RouteUrl("Product", new { SeName = product.SeName })">@product.Name</a></li>
                        }
                    </ul>
                </div>
            </div>
        }
    </div>
</div>
